function BatteryStorage({ size }: { size: number }) {
  return (
    <svg
      width={size}
      height={size}
      viewBox="0 0 8 8"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M3.32996 1.99999C3.32996 1.88953 3.4195 1.79999 3.52996 1.79999H4.45996C4.57041 1.79999 4.65996 1.88953 4.65996 1.99999V6.39999C4.65996 6.51045 4.57041 6.59999 4.45996 6.59999H3.52996C3.4195 6.59999 3.32996 6.51045 3.32996 6.39999V1.99999Z"
        fill="white"
      />
      <path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M3.62996 0C3.46427 0 3.32996 0.134315 3.32996 0.3V0.5H3C2.44772 0.5 2 0.947715 2 1.5V7C2 7.55228 2.44772 8 3 8H5C5.55228 8 6 7.55228 6 7V1.5C6 0.947715 5.55228 0.5 5 0.5H4.65996V0.3C4.65996 0.134315 4.52564 0 4.35996 0H3.62996ZM3 1.25H5C5.13807 1.25 5.25 1.36193 5.25 1.5V7C5.25 7.13807 5.13807 7.25 5 7.25H3C2.86193 7.25 2.75 7.13807 2.75 7V1.5C2.75 1.36193 2.86193 1.25 3 1.25Z"
        fill="white"
      />
    </svg>
  );
}

function Biomass({ size }: { size: number }) {
  return (
    <svg
      width={size}
      height={size}
      viewBox="0 0 8 8"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M4.79688 3.23438C6.09375 3.09375 7.10938 2.0625 7.23438 0.75H7.125C5.92188 0.75 4.90625 1.53125 4.51562 2.59375C4.39062 2.32812 4.21875 2.07812 4.03125 1.85938C4.625 0.75 5.78125 0 7.125 0H7.5C7.76562 0 8 0.234375 8 0.5C8 2.28125 6.67188 3.75 4.95312 3.96875C4.92188 3.71875 4.875 3.48438 4.79688 3.23438ZM0.75 1.75V2C0.75 3.53125 1.96875 4.75 3.5 4.75H3.625V4.5C3.625 2.98438 2.39062 1.75 0.875 1.75H0.75ZM4.375 4.5V4.75V5.5V7.625C4.375 7.84375 4.20312 8 4 8C3.78125 8 3.625 7.84375 3.625 7.625V5.5H3.5C1.5625 5.5 0 3.9375 0 2V1.5C0 1.23438 0.21875 1 0.5 1H0.875C2.79688 1 4.375 2.57812 4.375 4.5Z"
        fill="white"
      />
    </svg>
  );
}

function Coal({ size }: { size: number }) {
  return (
    <svg
      width={size}
      height={size}
      viewBox="0 0 8 8"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M3.78066 0.850998C3.50267 0.686406 3.14372 0.781766 2.98408 1.06262L0.845654 4.82471C0.714296 5.05581 0.757606 5.34671 0.950588 5.52952L1.97434 6.49932C2.0299 6.55196 2.09537 6.59303 2.16694 6.62015L3.67669 7.19222C3.84639 7.25653 4.03645 7.23736 4.18989 7.14045L6.96023 5.39088C7.19508 5.24256 7.29113 4.94811 7.1889 4.68986L6.32013 2.49523C6.27298 2.37611 6.18756 2.27604 6.07731 2.21077L3.78066 0.850998ZM2.31441 0.682023C2.68691 0.026695 3.52446 -0.195809 4.17311 0.188238L6.46976 1.54801C6.727 1.70031 6.92631 1.9338 7.03634 2.21175L7.90511 4.40638C8.14365 5.00897 7.91954 5.69602 7.37155 6.0421L4.60121 7.79167C4.24319 8.01778 3.79971 8.06251 3.40373 7.91247L1.89398 7.34039C1.72699 7.27711 1.57423 7.18128 1.44458 7.05847L0.420835 6.08867C-0.0294566 5.6621 -0.130514 4.98334 0.175988 4.44411L2.31441 0.682023Z"
        fill="white"
      />
      <path
        d="M2.37624 4.72211L3.04163 3.55143C3.31796 3.06524 3.9393 2.90017 4.4205 3.18509L5.028 3.54479C5.21883 3.65779 5.36669 3.83101 5.44831 4.03722L5.68394 4.63248C5.8609 5.07954 5.69465 5.58926 5.28812 5.84601L4.41088 6.40006C4.14528 6.56781 3.81628 6.601 3.52253 6.48968L3.06563 6.31654C2.94174 6.2696 2.82842 6.1985 2.73224 6.10739L2.55788 5.9422C2.22383 5.62573 2.14886 5.12216 2.37624 4.72211Z"
        fill="white"
      />
    </svg>
  );
}

function Gas({ size }: { size: number }) {
  return (
    <svg
      width={size}
      height={size}
      viewBox="0 0 8 8"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M1.89062 2.44499C1.5 3.1335 1.25 3.83765 1.25 4.41663C1.25 6.02836 2.45312 7.2489 4 7.2489C5.51562 7.2489 6.75 6.02836 6.75 4.41663C6.75 3.96284 6.57812 3.35257 6.29688 2.75795C6.04688 2.19462 5.71875 1.69389 5.40625 1.36528C5.34375 1.44352 5.26562 1.55306 5.17188 1.66259C5.14062 1.72518 5.09375 1.78778 5.04688 1.85037C4.98438 1.94425 4.90625 2.05379 4.85938 2.11638C4.79688 2.21027 4.6875 2.25721 4.5625 2.27286C4.45312 2.27286 4.34375 2.21027 4.26562 2.11638C4.21875 2.05379 4.15625 1.97555 4.09375 1.91296C3.79688 1.52176 3.45312 1.08362 3.15625 0.786308C2.73438 1.19315 2.26562 1.78778 1.89062 2.44499ZM3.60938 0.176039C3.90625 0.457702 4.25 0.880196 4.54688 1.25575L4.5625 1.2401C4.67188 1.06797 4.8125 0.880196 4.9375 0.755012C5.20312 0.520293 5.59375 0.520293 5.85938 0.755012C6.26562 1.16186 6.67188 1.78778 6.96875 2.44499C7.28125 3.08655 7.5 3.80636 7.5 4.41663C7.5 6.43521 5.9375 8 4 8C2.03125 8 0.5 6.41956 0.5 4.41663C0.5 3.63423 0.8125 2.80489 1.23438 2.06944C1.65625 1.33399 2.20312 0.645477 2.70312 0.176039C2.96875 -0.0586797 3.35938 -0.0586797 3.60938 0.176039ZM4.01562 6.4978C3.03125 6.4978 2.25 5.87188 2.23438 4.79218C2.23438 4.32274 2.5 3.90024 3.03125 3.24303C3.14062 3.11785 3.32812 3.11785 3.42188 3.24303C3.6875 3.57164 4.14062 4.16626 4.40625 4.49487C4.5 4.62005 4.6875 4.62005 4.78125 4.49487L5.1875 4.04108C5.28125 3.91589 5.46875 3.93154 5.53125 4.07237C5.92188 4.79218 5.75 5.7154 5.09375 6.16919C4.76562 6.38826 4.42188 6.4978 4.01562 6.4978Z"
        fill="black"
      />
    </svg>
  );
}

function Geothermal({ size }: { size: number }) {
  return (
    <svg
      width={size}
      height={size}
      viewBox="0 0 8 8"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M3.14286 0C3.375 0 3.57143 0.196429 3.57143 0.428571V2C3.57143 2.66071 3.76786 3.28571 4.16071 3.80357L4.5 4.26786C5 4.92857 5.28571 5.75 5.28571 6.57143V7.57143C5.28571 7.82143 5.08929 8 4.85714 8C4.60714 8 4.42857 7.82143 4.42857 7.57143V6.57143C4.42857 5.92857 4.21429 5.30357 3.82143 4.78571L3.48214 4.32143C2.98214 3.66071 2.71429 2.83929 2.71429 2V0.428571C2.71429 0.196429 2.89286 0 3.14286 0ZM0.428571 1.14286C0.660714 1.14286 0.857143 1.33929 0.857143 1.57143V2.25C0.857143 2.85714 1.01786 3.42857 1.35714 3.92857L1.91071 4.76786C2.33929 5.39286 2.57143 6.14286 2.57143 6.91071V7.57143C2.57143 7.82143 2.375 8 2.14286 8C1.89286 8 1.71429 7.82143 1.71429 7.57143V6.91071C1.71429 6.30357 1.53571 5.73214 1.19643 5.23214L0.642857 4.39286C0.214286 3.76786 0 3.01786 0 2.25V1.57143C0 1.33929 0.178571 1.14286 0.428571 1.14286ZM6.28571 1.57143V2.25C6.28571 2.85714 6.44643 3.42857 6.78571 3.92857L7.33929 4.76786C7.76786 5.39286 8 6.14286 8 6.91071V7.57143C8 7.82143 7.80357 8 7.57143 8C7.32143 8 7.14286 7.82143 7.14286 7.57143V6.91071C7.14286 6.30357 6.96429 5.73214 6.625 5.23214L6.07143 4.39286C5.64286 3.76786 5.42857 3.01786 5.42857 2.25V1.57143C5.42857 1.33929 5.60714 1.14286 5.85714 1.14286C6.08929 1.14286 6.28571 1.33929 6.28571 1.57143Z"
        fill="white"
      />
    </svg>
  );
}

function HydroStorage({ size }: { size: number }) {
  return (
    <svg
      width={size}
      height={size}
      viewBox="0 0 8 8"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M4.375 0.875V1.20312L6 1C6.26562 1 6.5 1.23438 6.5 1.5C6.5 1.78125 6.26562 2 6 2L4.375 1.79688V3H7.25V2.875C7.25 2.67188 7.40625 2.5 7.625 2.5C7.82812 2.5 8 2.67188 8 2.875V3.375V6.625V7.125C8 7.34375 7.82812 7.5 7.625 7.5C7.40625 7.5 7.25 7.34375 7.25 7.125V7H0.75V7.125C0.75 7.34375 0.578125 7.5 0.375 7.5C0.15625 7.5 0 7.34375 0 7.125V6.625V3.375V2.875C0 2.67188 0.15625 2.5 0.375 2.5C0.578125 2.5 0.75 2.67188 0.75 2.875V3H3.625V1.79688L2 2C1.71875 2 1.5 1.78125 1.5 1.5C1.5 1.23438 1.71875 1 2 1L3.625 1.20312V0.875C3.625 0.671875 3.78125 0.5 4 0.5C4.20312 0.5 4.375 0.671875 4.375 0.875ZM0.75 6.25H7.25V3.75H4H0.75V6.25Z"
        fill="white"
      />
    </svg>
  );
}

function Hydro({ size }: { size: number }) {
  return (
    <svg
      width={size}
      height={size}
      viewBox="0 0 8 8"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M1.11945 1.1075C1.2444 0.964167 1.42489 0.964167 1.54985 1.1075C1.85529 1.39416 2.2718 1.63305 2.66055 1.63305C3.06318 1.63305 3.47969 1.39416 3.77125 1.1075C3.91009 0.964167 4.09058 0.964167 4.21553 1.1075C4.52098 1.39416 4.93749 1.63305 5.32624 1.63305C5.72887 1.63305 6.14538 1.39416 6.43694 1.1075C6.5619 0.964167 6.75627 0.964167 6.88122 1.1075C7.11725 1.34638 7.43658 1.52157 7.74202 1.60119C7.90862 1.64897 8.03358 1.85601 7.99193 2.06304C7.95028 2.27007 7.76979 2.39748 7.5893 2.3497C7.18667 2.25415 6.86734 2.03119 6.65908 1.87193C6.27034 2.17452 5.81217 2.4134 5.32624 2.4134C4.85419 2.4134 4.38214 2.17452 3.99339 1.87193C3.60465 2.17452 3.14648 2.4134 2.66055 2.4134C2.1885 2.4134 1.71645 2.17452 1.3277 1.87193C1.13333 2.03119 0.80012 2.25415 0.411374 2.3497C0.230884 2.39748 0.050395 2.27007 0.00874358 2.06304C-0.0329078 1.85601 0.0781626 1.64897 0.258652 1.60119C0.577979 1.52157 0.869539 1.33046 1.11945 1.1075ZM1.11945 5.69409C1.2444 5.55076 1.42489 5.55076 1.54985 5.69409C1.85529 5.98076 2.2718 6.21964 2.66055 6.21964C3.06318 6.21964 3.47969 5.98076 3.77125 5.69409C3.91009 5.55076 4.09058 5.55076 4.21553 5.69409C4.52098 5.98076 4.93749 6.21964 5.32624 6.21964C5.72887 6.21964 6.14538 5.98076 6.43694 5.69409C6.5619 5.55076 6.75627 5.55076 6.88122 5.69409C7.11725 5.93298 7.43658 6.10816 7.74202 6.18779C7.90862 6.23557 8.03358 6.4426 7.99193 6.64963C7.95028 6.85667 7.76979 6.98407 7.5893 6.9363C7.18667 6.84074 6.86734 6.61778 6.65908 6.45853C6.27034 6.76111 5.81217 7 5.32624 7C4.85419 7 4.38214 6.76111 3.99339 6.45853C3.60465 6.76111 3.14648 7 2.66055 7C2.1885 7 1.71645 6.76111 1.3277 6.45853C1.13333 6.61778 0.80012 6.84074 0.411374 6.9363C0.230884 6.98407 0.050395 6.85667 0.00874358 6.64963C-0.0329078 6.4426 0.0781626 6.23557 0.258652 6.18779C0.564095 6.10816 0.869539 5.93298 1.10556 5.69409H1.11945ZM1.54985 3.4008C1.85529 3.68746 2.2718 3.92634 2.66055 3.92634C3.06318 3.92634 3.47969 3.68746 3.77125 3.4008C3.91009 3.25747 4.09058 3.25747 4.21553 3.4008C4.52098 3.68746 4.93749 3.92634 5.32624 3.92634C5.72887 3.92634 6.14538 3.68746 6.43694 3.4008C6.5619 3.25747 6.75627 3.25747 6.88122 3.4008C7.11725 3.63968 7.43658 3.81486 7.74202 3.89449C7.90862 3.94227 8.03358 4.1493 7.99193 4.35634C7.95028 4.56337 7.76979 4.69078 7.5893 4.643C7.18667 4.54745 6.86734 4.32449 6.65908 4.16523C6.27034 4.46782 5.81217 4.7067 5.32624 4.7067C4.85419 4.7067 4.38214 4.46782 3.99339 4.16523C3.60465 4.46782 3.14648 4.7067 2.66055 4.7067C2.1885 4.7067 1.71645 4.46782 1.3277 4.16523C1.13333 4.32449 0.80012 4.54745 0.411374 4.643C0.230884 4.69078 0.050395 4.56337 0.00874358 4.35634C-0.0329078 4.1493 0.0781626 3.94227 0.258652 3.89449C0.564095 3.81486 0.869539 3.63968 1.10556 3.4008C1.23052 3.27339 1.42489 3.27339 1.54985 3.4008Z"
        fill="white"
      />
    </svg>
  );
}

function Nuclear({ size }: { size: number }) {
  return (
    <svg
      width={size}
      height={size}
      viewBox="0 0 8 8"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M1.02787 6.97213C1.17068 7.11493 1.59909 7.27559 2.47377 6.97213C2.70583 6.90072 2.95574 6.79362 3.20565 6.66867C2.86649 6.40091 2.52733 6.1153 2.20601 5.79399C1.8847 5.47267 1.59909 5.13351 1.33133 4.79435C1.20638 5.04426 1.09928 5.29417 1.02787 5.52623C0.724414 6.40091 0.88507 6.82932 1.02787 6.97213ZM0.795817 3.99107C-0.0788629 2.52733 -0.27522 1.11713 0.420954 0.420954C1.11713 -0.27522 2.52733 -0.0788629 4.00893 0.795817C5.47267 -0.0788629 6.88287 -0.27522 7.57905 0.420954C8.27522 1.11713 8.07886 2.52733 7.20418 3.99107C8.07886 5.47267 8.27522 6.88287 7.57905 7.57905C6.88287 8.27522 5.47267 8.07886 4.00893 7.20418C2.52733 8.07886 1.11713 8.27522 0.420954 7.57905C-0.27522 6.88287 -0.0788629 5.47267 0.795817 3.99107ZM1.34919 3.20565C1.59909 2.86649 1.8847 2.52733 2.20601 2.20601C2.54518 1.8847 2.86649 1.59909 3.20565 1.33133C2.95574 1.20638 2.70583 1.09928 2.47377 1.01002C1.59909 0.724414 1.17068 0.88507 1.02787 1.02787C0.88507 1.17068 0.724414 1.58124 1.02787 2.45592C1.09928 2.70583 1.20638 2.95574 1.34919 3.20565ZM4.00893 1.8133C3.59836 2.09891 3.20565 2.43807 2.81293 2.81293C2.43807 3.20565 2.09891 3.59836 1.83115 3.99107C2.09891 4.40164 2.43807 4.79435 2.81293 5.18707C3.20565 5.56193 3.59836 5.90109 4.00893 6.16885C4.40164 5.90109 4.79435 5.56193 5.18707 5.18707C5.56193 4.79435 5.90109 4.40164 6.1867 3.99107C5.90109 3.59836 5.56193 3.20565 5.18707 2.81293C4.79435 2.43807 4.40164 2.09891 4.00893 1.8133ZM6.66867 3.20565C6.79362 2.95574 6.90072 2.70583 6.97213 2.47377C7.27559 1.59909 7.11493 1.17068 6.97213 1.02787C6.82932 0.88507 6.40091 0.724414 5.52623 1.02787C5.29417 1.09928 5.04426 1.20638 4.79435 1.33133C5.13351 1.59909 5.47267 1.8847 5.79399 2.20601C6.1153 2.52733 6.40091 2.86649 6.66867 3.20565ZM6.66867 4.79435C6.40091 5.13351 6.1153 5.47267 5.79399 5.79399C5.47267 6.1153 5.13351 6.40091 4.79435 6.66867C5.04426 6.79362 5.29417 6.90072 5.52623 6.97213C6.40091 7.27559 6.82932 7.11493 6.97213 6.97213C7.11493 6.82932 7.27559 6.40091 6.97213 5.52623C6.90072 5.29417 6.79362 5.04426 6.66867 4.79435ZM3.43771 3.99107C3.43771 3.68761 3.68761 3.41986 4.00893 3.41986C4.31239 3.41986 4.58014 3.68761 4.58014 3.99107C4.58014 4.31239 4.31239 4.56229 4.00893 4.56229C3.68761 4.56229 3.43771 4.31239 3.43771 3.99107Z"
        fill="white"
      />
    </svg>
  );
}

function Oil({ size }: { size: number }) {
  return (
    <svg
      width={size}
      height={size}
      viewBox="0 0 8 8"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M4 7.25C5.23438 7.25 6.25 6.25 6.25 5C6.25 4.8125 6.15625 4.48438 5.98438 4.04688C5.79688 3.64062 5.54688 3.1875 5.26562 2.73438C4.8125 2 4.3125 1.3125 4 0.90625C3.67188 1.3125 3.17188 2 2.71875 2.73438C2.4375 3.1875 2.1875 3.64062 2.01562 4.04688C1.82812 4.48438 1.75 4.79688 1.75 5C1.75 6.25 2.75 7.25 4 7.25ZM1 5C1 3.57812 3.03125 0.90625 3.59375 0.1875C3.6875 0.078125 3.82812 0 3.98438 0H4C4.15625 0 4.29688 0.078125 4.39062 0.1875C4.95312 0.90625 7 3.57812 7 5C7 6.65625 5.65625 8 4 8C2.34375 8 1 6.65625 1 5ZM3.25 4.875C3.25 5.35938 3.64062 5.75 4.125 5.75C4.32812 5.75 4.5 5.92188 4.5 6.125C4.5 6.34375 4.32812 6.5 4.125 6.5C3.21875 6.5 2.5 5.78125 2.5 4.875C2.5 4.67188 2.65625 4.5 2.875 4.5C3.07812 4.5 3.25 4.67188 3.25 4.875Z"
        fill="white"
      />
    </svg>
  );
}

function Solar({ size }: { size: number }) {
  return (
    <svg
      width={size}
      height={size}
      viewBox="0 0 8 8"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M5.86582 0.307392L6.14686 1.85313L7.69261 2.13418C7.81752 2.14979 7.92681 2.24347 7.97365 2.35277C8.02049 2.47768 8.00488 2.60259 7.92681 2.71188L7.03684 3.99219L7.92681 5.28812C8.00488 5.39741 8.02049 5.52232 7.97365 5.64723C7.92681 5.75653 7.81752 5.85021 7.69261 5.86582L6.14686 6.14686L5.86582 7.69261C5.85021 7.81752 5.75653 7.92681 5.64723 7.97365C5.52232 8.02049 5.39741 8.00488 5.28812 7.92681L4.00781 7.03684L2.71188 7.92681C2.60259 8.00488 2.47768 8.02049 2.35277 7.97365C2.24347 7.9112 2.14979 7.81752 2.13418 7.69261L1.85313 6.14686L0.307392 5.86582C0.182484 5.85021 0.0731886 5.75653 0.0263479 5.64723C-0.0204928 5.52232 -0.00487924 5.39741 0.0731886 5.28812L0.963162 3.99219L0.0731886 2.71188C-0.00487924 2.60259 -0.0204928 2.47768 0.0263479 2.35277C0.0888021 2.24347 0.182484 2.14979 0.307392 2.13418L1.85313 1.85313L2.13418 0.307392C2.14979 0.182484 2.24347 0.0731886 2.35277 0.0263479C2.47768 -0.0204928 2.60259 -0.00487924 2.71188 0.0731886L4.00781 0.963162L5.28812 0.0731886C5.39741 -0.00487924 5.52232 -0.0204928 5.64723 0.0263479C5.75653 0.0731886 5.85021 0.182484 5.86582 0.307392ZM4.21078 1.71261C4.08587 1.80629 3.91413 1.80629 3.78922 1.71261L2.75872 1.01L2.54013 2.24347C2.5089 2.384 2.384 2.5089 2.24347 2.54013L1.01 2.75872L1.72823 3.78922C1.80629 3.91413 1.80629 4.08587 1.72823 4.21078L1.01 5.24128L2.24347 5.45987C2.384 5.4911 2.5089 5.616 2.54013 5.75653L2.75872 6.99L3.78922 6.27177C3.91413 6.19371 4.08587 6.19371 4.21078 6.27177L5.24128 6.99L5.45987 5.75653C5.4911 5.616 5.616 5.4911 5.75653 5.45987L6.99 5.24128L6.28739 4.21078C6.19371 4.08587 6.19371 3.91413 6.28739 3.78922L6.99 2.75872L5.75653 2.54013C5.616 2.5089 5.4911 2.384 5.45987 2.24347L5.24128 1.01L4.21078 1.71261ZM4.00781 5.74091C3.36765 5.74091 2.80556 5.41303 2.49329 4.86655C2.16541 4.33569 2.16541 3.66431 2.49329 3.11783C2.80556 2.58697 3.36765 2.24347 4.00781 2.24347C4.63235 2.24347 5.19444 2.58697 5.50671 3.11783C5.83459 3.66431 5.83459 4.33569 5.50671 4.86655C5.19444 5.41303 4.63235 5.74091 4.00781 5.74091ZM3.00854 3.99219C3.00854 4.35131 3.1959 4.67919 3.50817 4.86655C3.80483 5.0383 4.19517 5.0383 4.50744 4.86655C4.8041 4.67919 5.00707 4.35131 5.00707 3.99219C5.00707 3.64869 4.8041 3.32081 4.50744 3.13345C4.19517 2.9617 3.80483 2.9617 3.50817 3.13345C3.1959 3.32081 3.00854 3.64869 3.00854 3.99219Z"
        fill="black"
      />
    </svg>
  );
}

function Unknown({ size }: { size: number }) {
  return (
    <svg
      width={size}
      height={size}
      viewBox="0 0 8 8"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M2.50781 2.5C2.50781 2.71875 2.33594 2.875 2.13281 2.875C1.91406 2.875 1.75781 2.71875 1.75781 2.5C1.75781 1.40625 2.64844 0.5 3.75781 0.5H4.24219C5.35156 0.5 6.24219 1.40625 6.24219 2.5V2.57812C6.24219 3.20312 5.92969 3.79688 5.41406 4.14062L4.60156 4.6875C4.46094 4.78125 4.38281 4.9375 4.38281 5.09375V5.125C4.38281 5.34375 4.21094 5.5 4.00781 5.5C3.78906 5.5 3.63281 5.34375 3.63281 5.125V5.09375C3.63281 4.6875 3.83594 4.29688 4.17969 4.0625L4.99219 3.51562C5.32031 3.3125 5.50781 2.95312 5.50781 2.57812V2.5C5.50781 1.8125 4.94531 1.25 4.25781 1.25H3.75781C3.05469 1.25 2.50781 1.8125 2.50781 2.5ZM4.00781 7.5C3.72656 7.5 3.50781 7.28125 3.50781 7C3.50781 6.73438 3.72656 6.5 4.00781 6.5C4.27344 6.5 4.50781 6.73438 4.50781 7C4.50781 7.28125 4.27344 7.5 4.00781 7.5Z"
        fill="black"
      />
    </svg>
  );
}

function Wind({ size }: { size: number }) {
  return (
    <svg
      width={size}
      height={size}
      viewBox="0 0 8 8"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M4.5 0.375C4.5 0.171875 4.65625 0 4.875 0H5.5625C6.34375 0 7 0.65625 7 1.4375C7 2.23438 6.34375 2.875 5.5625 2.875H0.375C0.15625 2.875 0 2.71875 0 2.5C0 2.29688 0.15625 2.125 0.375 2.125H5.5625C5.9375 2.125 6.25 1.82812 6.25 1.4375C6.25 1.0625 5.9375 0.75 5.5625 0.75H4.875C4.65625 0.75 4.5 0.59375 4.5 0.375ZM5.5 6.125C5.5 5.92188 5.65625 5.75 5.875 5.75H6.5625C6.9375 5.75 7.25 5.45312 7.25 5.0625C7.25 4.6875 6.9375 4.375 6.5625 4.375H0.375C0.15625 4.375 0 4.21875 0 4C0 3.79688 0.15625 3.625 0.375 3.625H6.5625C7.34375 3.625 8 4.28125 8 5.0625C8 5.85938 7.34375 6.5 6.5625 6.5H5.875C5.65625 6.5 5.5 6.34375 5.5 6.125ZM1.875 8C1.65625 8 1.5 7.84375 1.5 7.625C1.5 7.42188 1.65625 7.25 1.875 7.25H2.5625C2.9375 7.25 3.25 6.95312 3.25 6.5625C3.25 6.1875 2.9375 5.875 2.5625 5.875H0.375C0.15625 5.875 0 5.71875 0 5.5C0 5.29688 0.15625 5.125 0.375 5.125H2.5625C3.34375 5.125 4 5.78125 4 6.5625C4 7.35938 3.34375 8 2.5625 8H1.875Z"
        fill="black"
      />
    </svg>
  );
}

const electricityTypeIcons = {
  battery_storage: BatteryStorage,
  biomass: Biomass,
  coal: Coal,
  gas: Gas,
  geothermal: Geothermal,
  hydro: Hydro,
  hydro_storage: HydroStorage,
  nuclear: Nuclear,
  oil: Oil,
  solar: Solar,
  unknown: Unknown,
  wind: Wind,
};

export default function ProductionSourceIcon({
  source,
  size = 10,
}: {
  source: string;
  size?: number;
}) {
  const sourceWithoutSpace = source.replaceAll(' ', '_');
  const Icon =
    electricityTypeIcons[sourceWithoutSpace as keyof typeof electricityTypeIcons];
  return <Icon size={size} />;
}
